<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>智能养殖远程管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <!-- <link rel="shortcut icon" href="../logo.png" /> -->
    <link rel="stylesheet" href="../plugins/layui/css/layui.css?v=${.Config.basic.version}" media="all">
    <link rel="stylesheet" href="../plugins/layui/css/style.css?v=${.Config.basic.version}" media="all">
    <link rel="stylesheet" href="../layuiadmin/style/admin.css?v=${.Config.basic.version}" media="all">
    <link rel="stylesheet" href="../plugins/zTree/css/metroStyle/metroStyle.css?v=${.Config.basic.version}">
    <link rel="stylesheet" href="../plugins/zTree/css/metroStyle/ext.css?v=${.Config.basic.version}">
    <link rel="stylesheet" href="//at.alicdn.com/t/c/font_3564966_a6tt4yhnzge.css" media="all">
    <link rel="stylesheet" href="../plugins/toastr/toastr.min.css?v=${.Config.basic.version}">
    <style>

        .layui-form-item .layui-input-inline {
            float: left;
            width: 150px;
            margin-right: 10px;
        }
        .layui-form-item {
            margin-top: 5px;
            margin-bottom: 5px;
        }

        .layui-btn + .layui-btn {
            margin-left: 5px;
        }
        .layui-btn-xs {
            height: 18px;
            line-height: 18px;
            padding: 0 5px;
            font-size: 11px;
        }

        .layui-form-label-lg {
            float: left;
            display: block;
            padding: 9px 15px;
            width: 130px;
            font-weight: 400;
            line-height: 20px;
            text-align: right;
        }

        /*.layui-form-item .layui-input[readonly] {*/
        /*    background-color: #0a1434;*/
        /*    color: #a6b8d5;*/
        /*    border: none;*/
        /*    border-top-color: currentcolor;*/
        /*    border-right-color: currentcolor;*/
        /*    border-bottom-color: currentcolor;*/
        /*    border-left-color: currentcolor;*/
        /*}*/
        .layui-btn-normal {
            background-color: transparent;
        }
    </style>

    <style>
        .layui-table-view .layui-table td, .layui-table-view .layui-table th {
            padding: 5px 0;
            border-top: 1px solid #404453;
            border-left: 1px solid #404453;
            border-bottom: 1px solid #404453;
            border-right: 1px solid #404453;
        }
        .layui-table tbody tr:hover, .layui-table thead tr, .layui-table-header, .layui-table-hover, .layui-table-mend, .layui-table-patch, .layui-table-total, .layui-table-total tr, .layui-table[lay-even] tr:nth-child(2n) {
            background-color: transparent !important;
        }
        .layui-table[lay-size="sm"] td, .layui-table[lay-size="sm"] th {
            font-size: 12px;
            padding: 2px 2px;
        }
        .layui-table td, .layui-table th, .layui-table-col-set, .layui-table-fixed-r, .layui-table-grid-down, .layui-table-header, .layui-table-page, .layui-table-tips-main, .layui-table-tool, .layui-table-total, .layui-table-view, .layui-table[lay-skin="line"], .layui-table[lay-skin="row"] {
            border-width: 1px;
            border-style: solid;
            border-color: #adacb3;
        }
        [v-clock]{
            display: none;
        }

        .style-select{
            height: 34px;
            line-height: 34px;
            background-color: #fff;
            color: #8f97b3;
            border-radius: 5px;
            border: 0px solid #6c7492;
        }
        
    </style>
    <style>
        /*以下修改layui 时间范围选择器去掉秒显示的样式*/
        .layui-laydate-content>.layui-laydate-list {padding-bottom: 0px;overflow: hidden }
        .layui-laydate-content>.layui-laydate-list>li {width:50%}
        .merge-box .scrollbox .merge-list {
            padding-bottom:5px;
        }
        .laydate-time-list li {width:100%;padding-left:0;text-align: center};
        </style>
</head>
<body class="layui-layout-body">
    <div class="">
        <div style="padding: 5px;">
            <div class="node_para" style="display: none;" v-clock>
                <div class="bg-panel">
                    <div class="panel-header">

                        <span class="panel-title ">
                            <span class="layui-badge-dot layui-bg-olive"></span> 
                            <span class="layui-text-xs ">基本参数</span>
                        </span>
                        <!-- <span onclick="onSaveLgNode()" class=" fr hand layui-text-sm layui-text-mute radius" style="margin: 5px;"><i class="layui-icon close-btn layui-icon-download-circle layui-text-green mr-sm"></i></span> -->
                        
                    </div>

                    <form  class="layui-form" id="form_node_param" lay-filter="form_node_param">
                        <div class="layui-form-item">
                            <!-- <div class="layui-inline">
                                <label class="layui-form-label-lg layui-form-label-sm">是否启用</label>
                                <div class="layui-input-inline">
                                    <input type="checkbox"  checked="" lay-skin="switch" lay-text="启用|关闭" name="_Enable">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label-lg layui-form-label-sm">SN序列号</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.Sn" placeholder="10位SN序列号" name=""  lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label-lg layui-form-label-sm">栏位编号</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.Hnum" id="Hnum" placeholder="AXXX" name="" lay-verify="required" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>-->

                            

                            <div class="layui-inline">
                                <label class="layui-form-label-lg layui-form-label-sm">模式</label>
                                <div class="layui-input-inline">
                                    <!-- <select lay-ignore  v-model="node_para.Mode" name="Mode" lay-filter="Mode" lay-verify="required" lay-search=""  >
                                        <option value="0">停用</option>
                                        <option value="1">妊娠</option>
                                        <option value="2">哺乳</option>
                                        <option value="3">保育</option>
                                        <option value="4">育肥</option>
                                        <option value="5">定时下料</option>
                                    </select> -->
                                    <!-- <select name="Mode" lay-filter="Mode" lay-verify="required" lay-search=""  >
                                        <option value="0">停用</option>
                                        <option value="1">妊娠</option>
                                        <option value="2">哺乳</option>
                                        <option value="3">保育</option>
                                        <option value="4">育肥</option>
                                        <option value="5">定时下料</option>
                                    </select> -->
                                    <input v-if="mode==0" type="text" readonly value="停用"  placeholder="" name="" lay-verify="" lay-verType="tips" autocomplete="off" class="layui-input">
                                    <input v-if="mode==1" type="text" readonly value="妊娠"  placeholder="" name="" lay-verify="" lay-verType="tips" autocomplete="off" class="layui-input">
                                    <input v-if="mode==2" type="text" readonly value="哺乳"  placeholder="" name="" lay-verify="" lay-verType="tips" autocomplete="off" class="layui-input">
                                    <input v-if="mode==3" type="text" readonly value="保育"  placeholder="" name="" lay-verify="" lay-verType="tips" autocomplete="off" class="layui-input">
                                    <input v-if="mode==4" type="text" readonly value="育肥"  placeholder="" name="" lay-verify="" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <!-- <div class="layui-inline">
                                <label class="layui-form-label-lg layui-form-label-sm">日龄</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.Gday" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div> -->

                            <div class="layui-inline">
                                <label class="layui-form-label-lg layui-form-label-sm">有余料AD值</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.CalAD" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label-lg layui-form-label-sm">无余料AD值</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.CalADR" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label-lg layui-form-label-sm">10圈出料(g)</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.CalFeed" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline" >
                                <label class="layui-form-label-lg layui-form-label-sm">1L水对应的脉冲数</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.PulseWater" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline" v-show="is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">水阀</label>
                                <div class="layui-input-inline">
                                    <input type="checkbox"  checked="" lay-skin="switch" lay-text="启用|禁用" name="_EnWater">
                                </div>
                            </div>

                            <div class="layui-inline " v-show="mode!=3 && mode!=4 && mode!=5 && is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">触碰杆</label>
                                <div class="layui-input-inline">
                                    <input type="checkbox"  checked="" lay-skin="switch" lay-text="启用|禁用" name="_EnTB" lay-filter="_EnTB">
                                </div>
                            </div>

                            <!-- <div class="layui-inline" v-show="is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">反转次数</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.ReverseTimes" placeholder="1-10" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline" v-show="is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">反转圈数</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly  v-model="node_para.ReverseTurns" placeholder="1.0-10.0" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div> -->

                            <div class="layui-inline" >
                                <label class="layui-form-label-lg layui-form-label-sm">延时下水时间(秒) <i class="layui-icon layui-icon-tips layui-text-white layui-text-sm" lay-tips="下料开始多少秒后开始下水" lay-offset="0"></i></label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.WaterDelay" placeholder="0-10" maxlength="2" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline" v-show="is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">下料/水保护延长时间(分)</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.PtTimeDelay" placeholder="0-30" maxlength="2" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline" v-show="1==1">
                                <label class="layui-form-label-lg layui-form-label-sm">手动出料(g)</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.ManOut" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline" v-show="1==1">
                                <label class="layui-form-label-lg layui-form-label-sm">手动出水(ml)</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.ManWaterOut" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            

                            <div class="layui-inline" v-show="(mode==1||mode==2) && enTB && is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">泌乳模式 无触碰超时(分)</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.Mr_notbTo" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline" v-show="(mode==1||mode==2) && is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">泌乳模式 强制出水(L) <i class="layui-icon layui-icon-tips layui-text-white layui-text-sm" lay-tips="采食结束后强制出水量" lay-offset="0"></i></label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.Mr_forceWater" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline" v-show="(mode==1||mode==2) && is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">泌乳模式 清槽时间(分)</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.Mr_clearTO" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <!-- <div v-if="node_para.TbPTime" v-show="(mode==1||mode==2) && enTB && is_admin" class="layui-inline" >
                                <label class="layui-form-label-lg layui-form-label-sm">300g 触碰杆保护时间(秒)</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.TbPTime[0]" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div v-if="node_para.TbPTime" v-show="(mode==1||mode==2) && enTB && is_admin" class="layui-inline">
                                <label class="layui-form-label-lg layui-form-label-sm">500g 触碰杆保护时间(秒)</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.TbPTime[1]" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div v-if="node_para.TbPTime" v-show="(mode==1||mode==2) && enTB && is_admin" class="layui-inline">
                                <label class="layui-form-label-lg layui-form-label-sm">1kg 触碰杆保护时间(秒)</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.TbPTime[2]" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div> -->

                            <div class="layui-inline" v-show="(mode==1||mode==2) ">
                                <label class="layui-form-label-lg layui-form-label-sm">提前退出补水时间(分) <i class="layui-icon layui-icon-tips layui-text-white layui-text-sm" lay-tips="差多少分钟到饲喂时段就不补水" lay-offset="0"></i></label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.CwExitTime" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline" v-show="(mode==1||mode==2||mode==3||mode==4) && is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">水阀没脉冲保护时间(秒) <i class="layui-icon layui-icon-tips layui-text-white layui-text-sm" lay-tips="水阀在多久没有感应到脉冲或者不足就报警(水压不足或者脉冲坏)" lay-offset="0"></i></label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.WaterPTTO" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline" v-show="mode==3">
                                <label class="layui-form-label-lg layui-form-label-sm">保育自动切换育肥</label>
                                <div class="layui-input-inline">
                                    <input type="checkbox"  checked="" lay-skin="switch" lay-text="启用|禁用" name="_EnAutoSwitchGrowthMode">
                                </div>
                            </div>

                            <div class="layui-inline" v-show="(mode==1||mode==2) && is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">首次触碰当诱食处理</label>
                                <div class="layui-input-inline">
                                    <input type="checkbox"  checked="" lay-skin="switch" lay-text="启用|禁用" name="_EnFirstTouchAsFirstFeed">
                                </div>
                            </div>

                            <div class="layui-inline" v-show="1==1">
                                <label class="layui-form-label-lg layui-form-label-sm">电机过流保护</label>
                                <div class="layui-input-inline">
                                    <input type="checkbox"  checked="" lay-skin="switch" lay-text="启用|禁用" name="_EnMotorCurProtect">
                                </div>
                            </div>

                            <div class="layui-inline" v-show="is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">电机空载检测</label>
                                <div class="layui-input-inline">
                                    <input type="checkbox"  checked="" lay-skin="switch" lay-text="启用|禁用" name="_EnMotorCurIdle">
                                </div>
                            </div>

                            <div class="layui-inline" v-show="is_admin">
                                <label class="layui-form-label-lg layui-form-label-sm">空载电流(mA)</label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.CurIdle" placeholder="1-255" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label-lg layui-form-label-sm">增加减少饲喂量 <i class="layui-icon layui-icon-tips layui-text-white layui-text-sm" lay-tips="饲喂量偏移量，可以为正负值" lay-offset="0"></i></label>
                                <div class="layui-input-inline">
                                    <input type="text" readonly v-model="node_para.FeedOffset" placeholder="" name="" lay-verify="number" lay-verType="tips" autocomplete="off" class="layui-input">
                                </div>
                                <label class="layui-form-label layui-form-label-xs">x100g</label>
                            </div>

                        </div>
                    </form>
                    
                </div>

                <div class="plan" >

                    <div v-show="(mode==1||mode==2)" class="bg-panel mr-top-md" >
                        <div class="panel-header pd-md">
                            <span class="panel-title ">
                                <span class="layui-badge-dot layui-bg-olive"></span> 
                                <span class="layui-text-xs ">妊娠阶段参数</span>

                    
                            </span>
                        </div>
                        <div class="mr-md" style="overflow: auto;">
                            <table class="layui-table" lay-size="sm">
                                <colgroup>
                                    <col width="40">
                                    <col width="50">
                                    <col width="40">
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="40" v-show="enTB && is_admin">
                                    <col width="40" v-show="enTB && is_admin" >
                                    <col width="40" v-show="enTB && is_admin">
                                    <col width="40" v-show="is_admin">
                                    <col width="40" v-show="is_admin">
                                    <col width="40" v-show="!enTB && is_admin">
                                    <col width="40" v-show="!enTB && is_admin">

                                    <col width="60" v-show="enTB && is_admin">
                                    <col width="60" v-show="enTB && is_admin">
                                    <col width="60" v-show="enTB && is_admin">
                                    <col width="60" v-show="enTB && is_admin">
                                    <col width="60" v-show="enTB && is_admin">
                                    <col width="60" v-show="enTB && is_admin">
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th class="center" colspan="1" rowspan="3">日龄</th>
                                        <th class="center" colspan="1" rowspan="3">日总料量</th>
                                        <th class="center" colspan="1" rowspan="3">水料比</th>
                                        <th class="center" colspan="1" rowspan="3">餐数</th>

                                        
                                        <th class="center" colspan="18" rowspan="1">每餐下料(下料单位kg)</th>
                                        <!-- <th class="center" v-else colspan="12" rowspan="1">每餐下料(下料单位kg)</th> -->

                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">诱食下料(kg)</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">首次触碰下料(kg)</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">触碰下料(kg)</th>
                                        <!-- <th class="center" colspan="1" rowspan="3" v-show="is_admin">下水保护时间(分)</th> -->
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit==0">下水保护时间(分)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit>0">下水保护时间(秒)</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="is_admin">单次补水量(L)</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="!enTB && is_admin">单次下料量(kg)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="!enTB && is_admin && wp_unit==0">自动出料保护时间(分)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="!enTB && is_admin && wp_unit>0">自动出料保护时间(秒)</th>

                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">诱食下料是否下水</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">整个时间段内未主动有效触碰退出</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">15分钟未触碰退出</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">智能未触碰退出</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">吃完退出</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">首次补水强制出水</th>

                                        <!-- <th class="center" colspan="1" rowspan="3">重置</th> -->
                                        
                                        <!-- <th><span @click="" class="layui-hide  fr hand layui-text-sm layui-text-mute radius" style="margin-right: 5px;"><i class="layui-icon close-btn layui-icon-add-circle layui-text-main-color mr-sm" style="font-size: 18px;"></i></span></th> -->
                                    </tr>

                                    <tr>
                                        <th class="center" colspan="3" rowspan="1">第1餐</th>
                                        <th class="center" colspan="3" rowspan="1">第2餐</th>
                                        <th class="center" colspan="3" rowspan="1">第3餐</th>
                                        <th class="center" colspan="3" rowspan="1">第4餐</th>
                                        <th class="center" colspan="3" rowspan="1">第5餐</th>
                                        <th class="center" colspan="3" rowspan="1">第6餐</th>
                                    </tr>

                                    <tr>
                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        

                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        

                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        

                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        

                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        

                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        
                                    </tr>

                                    
                                </thead>
                                <tbody>
                                    <form  class="layui-form" id="form_pg_param" lay-filter="form_pg_param">
                                        <template  v-for="(item,idx) in Pg_para">
                                            <tr>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_gday" @input="on_Pg_gday(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input" style="width: 40px">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" v-model="item.Pg_total_feed" readonly name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input" :class="item.Pg_total_feed>0?'layui-input-green':''" style="width: 40px">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_waterFeed" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input" :class="item.Pg_waterFeed>0?'layui-input-green':''" style="width: 40px">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" v-model="item.Pg_feed_num" readonly name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input" :class="item.Pg_feed_num>0?'layui-input-green':''" style="width: 40px">
                                                    </div>
                                                </td>

                                                <td>
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly :id="'Pg_time-'+idx+'-0'" :idx="idx" :idx1="0" v-model="item.Pg_time[0]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input Pg_time" :class="item.Pg_time[0]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input readonly type="checkbox" v-model="item.Pg_rev_bits[0]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_rev_bits0">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_outT[0]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input" :class="item.Pg_outT[0]>0?'layui-input-green':''" style="width: 40px">
                                                    </div>
                                                </td>


                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly :id="'Pg_time-'+idx+'-1'" :idx="idx" :idx1="1" v-model="item.Pg_time[1]" v-model="item.Pg_time[1]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input Pg_time" :class="item.Pg_time[1]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input readonly type="checkbox" v-model="item.Pg_rev_bits[1]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_rev_bits1">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_outT[1]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input" :class="item.Pg_outT[1]>0?'layui-input-green':''" style="width: 40px">
                                                    </div>
                                                </td>

                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly :id="'Pg_time-'+idx+'-2'" :idx="idx" :idx1="2"  v-model="item.Pg_time[2]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input Pg_time" :class="item.Pg_time[2]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input readonly type="checkbox" v-model="item.Pg_rev_bits[2]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_rev_bits2">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_outT[2]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input" :class="item.Pg_outT[2]>0?'layui-input-green':''" style="width: 40px">
                                                    </div>
                                                </td>

                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly :id="'Pg_time-'+idx+'-3'" :idx="idx" :idx1="3" v-model="item.Pg_time[3]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input Pg_time" :class="item.Pg_time[3]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input readonly type="checkbox" v-model="item.Pg_rev_bits[3]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_rev_bits3">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_outT[3]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input" :class="item.Pg_outT[3]>0?'layui-input-green':''" style="width: 40px">
                                                    </div>
                                                </td>

                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly :id="'Pg_time-'+idx+'-4'" :idx="idx" :idx1="4" v-model="item.Pg_time[4]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input Pg_time" :class="item.Pg_time[4]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input readonly type="checkbox" v-model="item.Pg_rev_bits[4]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_rev_bits4">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_outT[4]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input" :class="item.Pg_outT[4]>0?'layui-input-green':''" style="width: 40px">
                                                    </div>
                                                </td>

                                                <td>
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly :id="'Pg_time-'+idx+'-5'" :idx="idx" :idx1="5" v-model="item.Pg_time[5]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input Pg_time" :class="item.Pg_time[5]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px;">
                                                    </div>
                                                </td>
                                                <td >
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input readonly type="checkbox" v-model="item.Pg_rev_bits[5]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_rev_bits5">
                                                    </div>
                                                </td>
                                                <td>
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_outT[5]" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input" :class="item.Pg_outT[5]>0?'layui-input-green':''" style="width: 40px;">
                                                    </div>
                                                </td>

                                                <td v-show="enTB && is_admin">
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_firstFeed" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input"  style="width: 40px;">
                                                    </div>
                                                </td>

                                                <td v-show="enTB && is_admin">
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_ftbFeed" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input"  style="width: 40px;">
                                                    </div>
                                                </td>

                                                <td v-show="enTB && is_admin">
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_tbFeed" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input"  style="width: 40px;">
                                                    </div>
                                                </td>

                                                <td v-show="is_admin">
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_wgapTime" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input"  style="width: 40px;">
                                                    </div>
                                                </td>

                                                <td v-show="is_admin">
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_cw" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input"  style="width: 40px;">
                                                    </div>
                                                </td>

                                                <td v-show="!enTB && is_admin">
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_autoFeed" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input"  style="width: 40px;">
                                                    </div>
                                                </td>

                                                <td v-show="!enTB && is_admin">
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="text" readonly v-model="item.Pg_fgapTime" @input="on_Pg_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                            class="layui-input"  style="width: 40px;">
                                                    </div>
                                                </td>

                                                <td v-show="enTB && is_admin">
                                                    <div  class="layui-input-inline" style="width: 100%;">
                                                        <input type="checkbox" readonly v-model="item.Pg_flag_bits[0]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_flag_bit0">
                                                    </div>
                                                </td>
                                                <td v-show="enTB && is_admin">
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="checkbox" readonly v-model="item.Pg_flag_bits[1]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_flag_bit1">
                                                    </div>
                                                </td>
                                                <td v-show="enTB && is_admin">
                                                    <div  class="layui-input-inline" style="width: 100%;">
                                                        <input type="checkbox" readonly v-model="item.Pg_flag_bits[2]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_flag_bit2">
                                                    </div>
                                                </td>
                                                <td v-show="enTB && is_admin">
                                                    <div class="layui-input-inline" style="width: 100%;">
                                                        <input type="checkbox" readonly v-model="item.Pg_flag_bits[3]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_flag_bit3">
                                                    </div>
                                                </td>
                                                <td v-show="enTB && is_admin">
                                                    <div  class="layui-input-inline" style="width: 100%;">
                                                        <input type="checkbox" readonly v-model="item.Pg_flag_bits[4]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_flag_bit4">
                                                    </div>
                                                </td>
                                                <td v-show="enTB && is_admin">
                                                    <div  class="layui-input-inline" style="width: 100%;">
                                                        <input type="checkbox" readonly v-model="item.Pg_flag_bits[5]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_Pg_flag_bit5">
                                                    </div>
                                                </td>
                                            </tr>
                                        </template>
                                    </form>
                                    
                                    
                                    
                                </tbody>
                            </table>
                        </div>

                        
                    </div>

                    <div v-show="(mode==1||mode==2)" class="bg-panel mr-top-md">
                        <div class="panel-header pd-md">
                            <span class="panel-title ">
                                <span class="layui-badge-dot layui-bg-olive"></span> 
                                <span class="layui-text-xs ">哺乳阶段参数</span>
                            </span>
                        </div>

                        <div class="mr-md" style="overflow: auto;">
                            <table class="layui-table" lay-size="sm">
                                <colgroup>
                                    <col width="40">
                                    <col width="50">
                                    <col width="40">
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="90">
                                    <col width="40" >
                                    <col width="40">

                                    <col width="40" v-show="enTB && is_admin">
                                    <col width="40" v-show="enTB && is_admin" >
                                    <col width="40" v-show="enTB && is_admin">
                                    <col width="40" v-show="is_admin">
                                    <col width="40" v-show="is_admin">
                                    <col width="40" v-show="!enTB && is_admin">
                                    <col width="40" v-show="!enTB && is_admin">

                                    <col width="60" v-show="enTB && is_admin">
                                    <col width="60" v-show="enTB && is_admin">
                                    <col width="60" v-show="enTB && is_admin">
                                    <col width="60" v-show="enTB && is_admin">
                                    <col width="60" v-show="enTB && is_admin">
                                    <col width="60" v-show="enTB && is_admin">
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th class="center" colspan="1" rowspan="3">日龄</th>
                                        <th class="center" colspan="1" rowspan="3">日总料量</th>
                                        <th class="center" colspan="1" rowspan="3">水料比</th>
                                        <th class="center" colspan="1" rowspan="3">餐数</th>

                                        <th class="center" colspan="18" rowspan="1">每餐下料(下料单位kg)</th>

                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">诱食下料(kg)</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">首次触碰下料(kg)</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">触碰下料(kg)</th>
                                        <!-- <th class="center" colspan="1" rowspan="3" v-show="is_admin">下水保护时间(分)</th> -->
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit==0">下水保护时间(分)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit>0">下水保护时间(秒)</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="is_admin">单次补水量(L)</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="!enTB && is_admin">单次下料量(kg)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="!enTB && is_admin && wp_unit==0">自动出料保护时间(分)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="!enTB && is_admin && wp_unit>0">自动出料保护时间(秒)</th>

                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">诱食下料是否下水</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">整个时间段内未主动有效触碰退出</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">15分钟未触碰退出</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">智能未触碰退出</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">吃完退出</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="enTB && is_admin">首次补水强制出水</th>

                                        <!-- <th class="center" colspan="1" rowspan="3">重置</th> -->
                                        
                                        <!-- <th><span @click="" class="layui-hide  fr hand layui-text-sm layui-text-mute radius" style="margin-right: 5px;"><i class="layui-icon close-btn layui-icon-add-circle layui-text-main-color mr-sm" style="font-size: 18px;"></i></span></th> -->
                                    </tr>

                                    <tr>
                                        <th class="center" colspan="3" rowspan="1">第1餐</th>
                                        <th class="center" colspan="3" rowspan="1">第2餐</th>
                                        <th class="center" colspan="3" rowspan="1">第3餐</th>
                                        <th class="center" colspan="3" rowspan="1">第4餐</th>
                                        <th class="center" colspan="3" rowspan="1">第5餐</th>
                                        <th class="center" colspan="3" rowspan="1">第6餐</th>
                                    </tr>

                                    <tr>
                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        

                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        

                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        

                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        

                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        

                                        <th class="center">时间</th>
                                        <th class="center" >诱食</th>
                                        <th class="center">下料</th>
                                        
                                    </tr>

                                    
                                </thead>

                                <tbody>
                                    <template  v-for="(item,idx) in La_para">
                                        <tr>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_gday" @input="on_La_gday(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" style="width: 40px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" v-model="item.La_total_feed" readonly name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="item.La_total_feed>0?'layui-input-green':''" style="width: 50px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_waterFeed" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="item.La_waterFeed>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_feed_num" readonly name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="item.La_feed_num>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'La_time-'+idx+'-0'" :idx="idx" :idx1="0" v-model="item.La_time[0]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input La_time" :class="item.La_time[0]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.La_rev_bits[0]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_rev_bits0">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_outT[0]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="item.La_outT[0]>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>


                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'La_time-'+idx+'-1'" :idx="idx" :idx1="1" v-model="item.La_time[1]" v-model="item.La_time[1]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input La_time" :class="item.La_time[1]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.La_rev_bits[1]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_rev_bits1">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_outT[1]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="item.La_outT[1]>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'La_time-'+idx+'-2'" :idx="idx" :idx1="2"  v-model="item.La_time[2]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input La_time" :class="item.La_time[2]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.La_rev_bits[2]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_rev_bits2">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_outT[2]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="item.La_outT[2]>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'La_time-'+idx+'-3'" :idx="idx" :idx1="3" v-model="item.La_time[3]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input La_time" :class="item.La_time[3]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.La_rev_bits[3]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_rev_bits3">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_outT[3]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="item.La_outT[3]>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'La_time-'+idx+'-4'" :idx="idx" :idx1="4" v-model="item.La_time[4]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input La_time" :class="item.La_time[4]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.La_rev_bits[4]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_rev_bits4">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_outT[4]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="item.La_outT[4]>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'La_time-'+idx+'-5'" :idx="idx" :idx1="5" v-model="item.La_time[5]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input La_time" :class="item.La_time[5]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px;">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.La_rev_bits[5]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_rev_bits5">
                                                </div>
                                            </td>
                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_outT[5]" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="item.La_outT[5]>0?'layui-input-green':''" style="width: 40px;">
                                                </div>
                                            </td>

                                            <td v-show="enTB && is_admin">
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_firstFeed" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 40px;">
                                                </div>
                                            </td>

                                            <td v-show="enTB && is_admin">
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_ftbFeed" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 40px;">
                                                </div>
                                            </td>

                                            <td v-show="enTB && is_admin">
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_tbFeed" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 40px;">
                                                </div>
                                            </td>

                                            <td v-show="is_admin">
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_wgapTime" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 40px;">
                                                </div>
                                            </td>

                                            <td v-show="is_admin">
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_cw" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 40px;">
                                                </div>
                                            </td>

                                            <td v-show="!enTB && is_admin">
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_autoFeed" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 40px;">
                                                </div>
                                            </td>

                                            <td v-show="!enTB && is_admin">
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.La_fgapTime" @input="on_La_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 40px;">
                                                </div>
                                            </td>

                                            <td v-show="enTB && is_admin">
                                                <div  class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" readonly v-model="item.La_flag_bits[0]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_flag_bit0">
                                                </div>
                                            </td>
                                            <td v-show="enTB && is_admin">
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" readonly v-model="item.La_flag_bits[1]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_flag_bit1">
                                                </div>
                                            </td>
                                            <td v-show="enTB && is_admin">
                                                <div  class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" readonly v-model="item.La_flag_bits[2]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_flag_bit2">
                                                </div>
                                            </td>
                                            <td v-show="enTB && is_admin">
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" readonly v-model="item.La_flag_bits[3]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_flag_bit3">
                                                </div>
                                            </td>
                                            <td v-show="enTB && is_admin">
                                                <div  class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" readonly v-model="item.La_flag_bits[4]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_flag_bit4">
                                                </div>
                                            </td>
                                            <td v-show="enTB && is_admin">
                                                <div  class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" readonly v-model="item.La_flag_bits[5]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_La_flag_bit5">
                                                </div>
                                            </td>
                                        </tr>
                                    </template>
                                    
                                    
                                </tbody>
                            </table>
                        </div>
                        
                    </div>

                    <div v-show="mode==3" class="bg-panel mr-top-md" >
                        <div class="panel-header pd-md">
                            <span class="panel-title ">
                                <span class="layui-badge-dot layui-bg-olive"></span> 
                                <span class="layui-text-xs ">保育方案参数</span>
                                
                            </span>
                        </div>

                        <div class="mr-md" style="overflow: auto;">
                            <table class="layui-table" lay-size="sm" style="table-layout: fixed !important;width: auto !important;">
                                <colgroup>
                                    <col width="40">
                                    <col width="40">

                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">


                                    <col width="60">
                                    <col width="60">
                                    <col width="60">
                                    <col width="60">

                                    <col width="60">
                                    
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th class="center" colspan="1" rowspan="3">日龄</th>
                                        <th class="center" colspan="1" rowspan="3">水料比</th>

                                        <th class="center" colspan="12" rowspan="1">时间段</th>

                                        <th class="center" colspan="1" rowspan="3">单次下料量(kg)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit==0">自动出料时间保护(分)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit==0">自动出水保护时间(分)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit>0">自动出料时间保护(秒)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit>0">自动出水保护时间(秒)</th>
                                        <th class="center" colspan="1" rowspan="3">单次补水量(L)</th>

                                        <!-- <th class="center" colspan="1" rowspan="3">重置</th> -->
                                    </tr>

                                    <tr>
                                        <th class="center" colspan="2" rowspan="1">第1餐</th>
                                        <th class="center" colspan="2" rowspan="1">第2餐</th>
                                        <th class="center" colspan="2" rowspan="1">第3餐</th>
                                        <th class="center" colspan="2" rowspan="1">第4餐</th>
                                        <th class="center" colspan="2" rowspan="1">第5餐</th>
                                        <th class="center" colspan="2" rowspan="1">第6餐</th>
                                    </tr>
                                    <tr>
                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>

                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>

                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>

                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>

                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>

                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>
                                    </tr>
                                    
                                </thead>
                                <tbody>
                                    <template  v-for="(item,idx) in Nr_para">
                                        <tr>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.Nr_gday" @input="on_Nr_gday(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" style="width: 40px">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.Nr_waterFeed" @input="on_Nr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="item.Nr_waterFeed>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Nr_time-'+idx+'-0'" :idx="idx" :idx1="0" v-model="item.Nr_time[0]" @input="on_Nr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Nr_time" :class="item.Nr_time[0]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Nr_flag_bits[0]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Nr_flag_bits0">
                                                </div>
                                            </td>


                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Nr_time-'+idx+'-1'" :idx="idx" :idx1="1" v-model="item.Nr_time[1]" v-model="item.Nr_time[1]" @input="on_Nr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Nr_time" :class="item.Nr_time[1]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Nr_flag_bits[1]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Nr_flag_bits1">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Nr_time-'+idx+'-2'" :idx="idx" :idx1="2"  v-model="item.Nr_time[2]" @input="on_Nr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Nr_time" :class="item.Nr_time[2]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Nr_flag_bits[2]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Nr_flag_bits2">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Nr_time-'+idx+'-3'" :idx="idx" :idx1="3" v-model="item.Nr_time[3]" @input="on_Nr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Nr_time" :class="item.Nr_time[3]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Nr_flag_bits[3]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Nr_flag_bits3">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Nr_time-'+idx+'-4'" :idx="idx" :idx1="4" v-model="item.Nr_time[4]" @input="on_Nr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Nr_time" :class="item.Nr_time[4]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Nr_flag_bits[4]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Nr_flag_bits4">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Nr_time-'+idx+'-5'" :idx="idx" :idx1="5" v-model="item.Nr_time[5]" @input="on_Nr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Nr_time" :class="item.Nr_time[5]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px;">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Nr_flag_bits[5]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Nr_flag_bits5">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.Nr_autoFeed" @input="on_Nr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 60px;">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.Nr_fgapTime" @input="on_Nr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 60px;">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.Nr_wgapTime" @input="on_Nr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 60px;">
                                                </div>
                                            </td>

                                            <td style="width: 60px;">
                                                <div class="layui-input-inline" >
                                                    <input type="text" readonly v-model="item.Nr_cw" @input="on_Nr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 60px;">
                                                </div>
                                            </td>
                                        </tr>
                                    </template>
                                    
                                    
                                </tbody>
                            </table>
                        </div>

                        
                    </div>


                    <div v-show="mode==4 || (mode==3 && autoSwitchGrowthMode>0)" class="bg-panel mr-top-md" >
                        <div class="panel-header pd-md">
                            <span class="panel-title ">
                                <span class="layui-badge-dot layui-bg-olive"></span> 
                                <span class="layui-text-xs ">育肥方案参数</span>
                                
                            </span>
                        </div>

                        <div class="mr-md" style="overflow: auto;">
                            <table class="layui-table" lay-size="sm" style="table-layout: fixed !important;width: auto !important;">
                                <colgroup>
                                    <col width="40">
                                    <col width="40">

                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">


                                    <col width="60">
                                    <col width="60">
                                    <col width="60">
                                    <col width="60">

                                    <col width="60">
                                    
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th class="center" colspan="1" rowspan="3">日龄</th>
                                        <th class="center" colspan="1" rowspan="3">水料比</th>

                                        <th class="center" colspan="12" rowspan="1">时间段</th>

                                        <th class="center" colspan="1" rowspan="3">单次下料量(kg)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit==0">自动出料时间保护(分)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit==0">自动出水保护时间(分)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit>0">自动出料时间保护(秒)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="wp_unit>0">自动出水保护时间(秒)</th>
                                        <th class="center" colspan="1" rowspan="3">单次补水量(L)</th>

                                        <!-- <th class="center" colspan="1" rowspan="3">重置</th> -->
                                    </tr>

                                    <tr>
                                        <th class="center" colspan="2" rowspan="1">第1餐</th>
                                        <th class="center" colspan="2" rowspan="1">第2餐</th>
                                        <th class="center" colspan="2" rowspan="1">第3餐</th>
                                        <th class="center" colspan="2" rowspan="1">第4餐</th>
                                        <th class="center" colspan="2" rowspan="1">第5餐</th>
                                        <th class="center" colspan="2" rowspan="1">第6餐</th>
                                    </tr>
                                    <tr>
                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>

                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>

                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>

                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>

                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>

                                        <th class="center">时间</th>
                                        <th class="center">诱食</th>
                                    </tr>
                                    
                                </thead>
                                <tbody>
                                    <template  v-for="(item,idx) in Fat_para">
                                        <tr>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.Fat_gday" @input="on_Fat_gday(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" style="width: 40px">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.Fat_waterFeed" @input="on_Fat_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="item.Fat_waterFeed>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Fat_time-'+idx+'-0'" :idx="idx" :idx1="0" v-model="item.Fat_time[0]" @input="on_Fat_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Fat_time" :class="item.Fat_time[0]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Fat_flag_bits[0]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Fat_flag_bits0">
                                                </div>
                                            </td>


                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Fat_time-'+idx+'-1'" :idx="idx" :idx1="1" v-model="item.Fat_time[1]" v-model="item.Fat_time[1]" @input="on_Fat_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Fat_time" :class="item.Fat_time[1]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Fat_flag_bits[1]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Fat_flag_bits1">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Fat_time-'+idx+'-2'" :idx="idx" :idx1="2"  v-model="item.Fat_time[2]" @input="on_Fat_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Fat_time" :class="item.Fat_time[2]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Fat_flag_bits[2]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Fat_flag_bits2">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Fat_time-'+idx+'-3'" :idx="idx" :idx1="3" v-model="item.Fat_time[3]" @input="on_Fat_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Fat_time" :class="item.Fat_time[3]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Fat_flag_bits[3]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Fat_flag_bits3">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Fat_time-'+idx+'-4'" :idx="idx" :idx1="4" v-model="item.Fat_time[4]" @input="on_Fat_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Fat_time" :class="item.Fat_time[4]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Fat_flag_bits[4]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Fat_flag_bits4">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :id="'Fat_time-'+idx+'-5'" :idx="idx" :idx1="5" v-model="item.Fat_time[5]" @input="on_Fat_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Fat_time" :class="item.Fat_time[5]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px;">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" v-model="item.Fat_flag_bits[5]" style="width: 40px;" checked="" lay-skin="switch" lay-text="是|否" name="_Fat_flag_bits5">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.Fat_autoFeed" @input="on_Fat_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 60px;">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.Fat_fgapTime" @input="on_Fat_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 60px;">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="item.Fat_wgapTime" @input="on_Fat_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 60px;">
                                                </div>
                                            </td>

                                            <td style="width: 60px;">
                                                <div class="layui-input-inline" >
                                                    <input type="text" readonly v-model="item.Fat_cw" @input="on_Fat_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 60px;">
                                                </div>
                                            </td>
                                        </tr>
                                    </template>
                                    
                                    
                                </tbody>
                            </table>
                        </div>
                        
                    </div>


                    <div v-show="mode==5" class="bg-panel mr-top-md">
                        <div class="panel-header pd-md">
                            <span class="panel-title ">
                                <span class="layui-badge-dot layui-bg-olive"></span> 
                                <span class="layui-text-xs ">定时方案参数</span>
                                
                            </span>
                        </div>

                        <div class="mr-md" style="overflow: auto;">
                            <table class="layui-table" lay-size="sm" style="table-layout: fixed !important;width: auto !important;">
                                <colgroup>
                                    <col width="40">
                                    <col width="40">
                                    <col width="40">

                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">
                                    <col width="90">
                                    <col width="40">

                                    <col width="60">
                                    <col width="60" v-show="Tmr_para.Tmr_flag_bits && Tmr_para.Tmr_flag_bits[0]">
                                    <col width="60" v-show="Tmr_para.Tmr_flag_bits && Tmr_para.Tmr_flag_bits[0]">
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th class="center" colspan="1" rowspan="3">日总料量</th>
                                        <th class="center" colspan="1" rowspan="3">水料比</th>
                                        <th class="center" colspan="1" rowspan="3">餐数</th>

                                        <th class="center" colspan="12" rowspan="1">每餐下料(下料单位kg)</th>

                                        <th class="center" colspan="1" rowspan="3">补水</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="Tmr_para.Tmr_flag_bits && Tmr_para.Tmr_flag_bits[0] && wp_unit==0">自动出水保护时间(分)</th>
                                        <th class="center" colspan="1" rowspan="3" v-if="Tmr_para.Tmr_flag_bits && Tmr_para.Tmr_flag_bits[0] && wp_unit>0">自动出水保护时间(秒)</th>
                                        <th class="center" colspan="1" rowspan="3" v-show="Tmr_para.Tmr_flag_bits && Tmr_para.Tmr_flag_bits[0]">单次补水量(L)</th>
                                        
                                        <!-- <th><span @click="" class="layui-hide  fr hand layui-text-sm layui-text-mute radius" style="margin-right: 5px;"><i class="layui-icon close-btn layui-icon-add-circle layui-text-main-color mr-sm" style="font-size: 18px;"></i></span></th> -->
                                    </tr>

                                    <tr>
                                        <th class="center" colspan="2" rowspan="1">第1餐</th>
                                        <th class="center" colspan="2" rowspan="1">第2餐</th>
                                        <th class="center" colspan="2" rowspan="1">第3餐</th>
                                        <th class="center" colspan="2" rowspan="1">第4餐</th>
                                        <th class="center" colspan="2" rowspan="1">第5餐</th>
                                        <th class="center" colspan="2" rowspan="1">第6餐</th>
                                    </tr>

                                    <tr>
                                        <th class="center">时间</th>
                                        <th class="center">下料</th>

                                        <th class="center">时间</th>
                                        <th class="center">下料</th>

                                        <th class="center">时间</th>
                                        <th class="center">下料</th>

                                        <th class="center">时间</th>
                                        <th class="center">下料</th>

                                        <th class="center">时间</th>
                                        <th class="center">下料</th>

                                        <th class="center">时间</th>
                                        <th class="center">下料</th>

                                        
                                    <tr>

                                    
                                </thead>
                                <tbody>
                                    <template  v-if="Tmr_para.Tmr_time">
                                        <tr>
                                        
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" v-model="Tmr_para.Tmr_total_feed" readonly name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="Tmr_para.Tmr_total_feed>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="Tmr_para.Tmr_waterFeed" @input="on_Tmr_waterFeed(item)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="Tmr_para.Tmr_waterFeed>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" v-model="Tmr_para.Tmr_feed_num" readonly name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="Tmr_para.Tmr_feed_num>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly  :idx="0"  v-model="Tmr_para.Tmr_time[0]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Tmr_time" :class="Tmr_para.Tmr_time[0]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="Tmr_para.Tmr_outT[0]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="Tmr_para.Tmr_outT[0]>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>


                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :idx="1" v-model="Tmr_para.Tmr_time[1]" v-model="Tmr_para.Tmr_time[1]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Tmr_time" :class="Tmr_para.Tmr_time[1]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="Tmr_para.Tmr_outT[1]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="Tmr_para.Tmr_outT[1]>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :idx="2"  v-model="Tmr_para.Tmr_time[2]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Tmr_time" :class="Tmr_para.Tmr_time[2]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="Tmr_para.Tmr_outT[2]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="Tmr_para.Tmr_outT[2]>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :idx="3" v-model="Tmr_para.Tmr_time[3]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Tmr_time" :class="Tmr_para.Tmr_time[3]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="Tmr_para.Tmr_outT[3]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="Tmr_para.Tmr_outT[3]>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :idx="4" v-model="Tmr_para.Tmr_time[4]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Tmr_time" :class="Tmr_para.Tmr_time[4]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px">
                                                </div>
                                            </td>
                                            <td >
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="Tmr_para.Tmr_outT[4]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="Tmr_para.Tmr_outT[4]>0?'layui-input-green':''" style="width: 40px">
                                                </div>
                                            </td>

                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly :idx="5" v-model="Tmr_para.Tmr_time[5]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input Tmr_time" :class="Tmr_para.Tmr_time[5]!='00:00 - 00:00'?'layui-input-green':''" style="width: 90px;">
                                                </div>
                                            </td>
                                            <td>
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="Tmr_para.Tmr_outT[5]" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input" :class="Tmr_para.Tmr_outT[5]>0?'layui-input-green':''" style="width: 40px;">
                                                </div>
                                            </td>

                                            <td>
                                                <div  class="layui-input-inline" style="width: 100%;">
                                                    <input type="checkbox" readonly v-model="Tmr_para.Tmr_flag_bits[0]" style="width: 60px;" checked="" lay-skin="switch" lay-text="是|否" name="_Tmr_flag_bits0">
                                                </div>
                                            </td>

                                            <td v-show="Tmr_para.Tmr_flag_bits && Tmr_para.Tmr_flag_bits[0]">
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="Tmr_para.Tmr_wgapTime" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 60px;">
                                                </div>
                                            </td>

                                            <td v-show="Tmr_para.Tmr_flag_bits && Tmr_para.Tmr_flag_bits[0]">
                                                <div class="layui-input-inline" style="width: 100%;">
                                                    <input type="text" readonly v-model="Tmr_para.Tmr_cw" @input="on_Tmr_waterFeed(item,idx)"  oninput="validate_0_1000000(this);" name="" lay-verify="" lay-verType="tips" placeholder="" autocomplete="off"
                                                        class="layui-input"  style="width: 60px;">
                                                </div>
                                            </td>
                                        </tr>
                                    </template>
                                    
                                </tbody>
                            </table>
                        </div>
                        
                    </div>

                </div>
                
            </div>
            <div style="height: 50px;">
                <button type="button" id="maxbtn" onclick="onMaxSize();" style="display: none;" class="radius-10 fr mr-lg layui-btn layui-btn-sm layui-btn-primary"><i class="layui-icon close-btn layui-icon-screen-full layui-text-white mr-sm"></i> 全屏</button>
                <button type="button" onclick="onRefresh();" class="action-edit radius-10 fr mr-lg layui-btn layui-btn-sm layui-btn-primary"><i class="layui-icon close-btn layui-icon-refresh layui-text-white mr-sm"></i> 刷新</button>
            </div>
        </div>
    </div>

</body>

<script src="../plugins/layui/layui.js"></script>
<script src="../plugins/vue/vue.min.js"></script>
<script src="../plugins/layui/xm-select-v1.2.4.js"></script>
<script src="../plugins/jquery/jquery-3.6.0.js?v=${.Config.basic.version}"></script>
<script src="../plugins/zTree/js/jquery.ztree.core.min.js?v=${.Config.basic.version}"></script>
<script src="../plugins/zTree/js/jquery.ztree.excheck.js?v=${.Config.basic.version}"></script>
<script src="../plugins/zTree/js/jquery.ztree.exedit.js?v=${.Config.basic.version}"></script>
<script src="../plugins/jquery.slimscroll.min.js"></script>
<script src="../plugins/toastr/toastr.min.js"></script>
<script src="../js/utils.js"></script>
<script src="../js/func.js?v=${.Config.basic.version}"></script>
<script src="../js/verify.js"></script>
<script>

    var no_display_zero = true;//是否把0显示为空
    var zTree=null;
    var table=null;
    var form=null;
    var Table=null;
    var lay_index=null;
    var curAddr=null;
    var laydate = null;

    var user_info=JSON.parse(window.localStorage.getItem("user_info"));
    var is_admin = user_info.is_admin;
    if(user_info.role_ids=="service"){
        is_admin = true;
    }
    var func_url="${.func_url}";
    var actions=[];
    var token = window.localStorage.getItem("token");
    token = 'Bearer ' + token;

    var czqPara=null;//终端参数
    var czqState=null;
    var select_node_idx=null;

    var request = getRequest();
    console.info(request);


    var vm = new Vue({
        el: '.node_para',
        data: {
            is_admin:is_admin,
            mode:0,//模式
            enTB:0,//是否启用触碰杆
            wp_unit:-1,//保护时间单位
            autoSwitchGrowthMode:0,
            node_para:{},
            Pg_para:[],
            La_para:[],
            Nr_para:[],
            Fat_para:[],
            Tmr_para:[]
        },
        updated:function(){
            console.info("updated")
            
        }
    });

    var selectedTreeNode=null;

    layui.config({
        base: '../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','layer','form', 'table','transfer','laydate','util'],function(){
        form = layui.form;
        table = layui.table;
        transfer = layui.transfer;
        laydate = layui.laydate;
        var util = layui.util;

        toastr.options = {
            "closeButton": false, //是否显示关闭按钮
            "debug": false, //是否使用debug模式
            "positionClass": "toast-top-center",//弹出窗的位置
            "showDuration": "300",//显示的动画时间
            "hideDuration": "1000",//消失的动画时间
            "timeOut": "2000", //展现时间
            "extendedTimeOut": "1000",//加长展示时间
            "showEasing": "swing",//显示时的动画缓冲方式
            "hideEasing": "linear",//消失时的动画缓冲方式
            "showMethod": "fadeIn",//显示时的动画方式
            "hideMethod": "fadeOut" //消失时的动画方式
        };

        $("#btnResetNode").hide();
        $(".node_para").show();

        $.ajax({
            type: 'GET',
            url: '../Api/User/Actions',
            data: {func_url:func_url},
            beforeSend: function(request) {
                request.setRequestHeader("Authorization", 'Bearer '+window.localStorage.getItem("token"));
            },
            dataType: "json",
            success: function (data) {
                console.info(data)
                actions=data.data;
                checkPermission();
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                layer.msg('加载操作信息失败');
            }
        });

        form.on('select(Mode)', function(data){
            var Mode=data.value;
            console.info("Mode",Mode);
            vm.mode = Mode;
            vm.node_para.Mode = Mode;
            //loadHouse(cur_farm_id,id);
            resize();
        });
        loadPara(request);

        if(request.max && request.max>0){
            $("#maxbtn").hide();
        }else{
            $("#maxbtn").show();
        }
    });

    function checkPermission(){
        for(var i=0;i<actions.length;i++){
            $('.action-'+actions[i].action_id).removeClass("layui-hide");
        }
    }

    function loadPara(item) {
        if(item.id && item.id!=''){
            layer.load(1);
            $.ajax({
                type: 'get',
                url: '../Api/Log/OpLogPara',
                data: {id:item.id},
                beforeSend: function(request) {
                    request.setRequestHeader("Authorization", 'Bearer '+window.localStorage.getItem("token"));
                },
                dataType: "json",
                success: function (res) {
                    if(res.code>=0){
                        list = res.data;
                        console.info(list);
                        if(list.length>0){
                            var nodePara =JSON.parse(list[0].para);
                            if(nodePara.ReverseTimes){
                                nodePara.WaterDelay = nodePara.ReverseTimes;
                            }
                            if(nodePara.ReverseTurns){
                                nodePara.PtTimeDelay = nodePara.ReverseTurns;
                            }
                            var nodeEn = list[0].enable;
                            disPlayNode(nodePara,nodeEn);
                        }
                        resize();
                        
                    }else{

                        layer.alert(res.msg);
                    }
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    layer.msg('读取设备参数失败');
                },
                complete: function(XMLHttpRequest, textStatus) {
                    layer.closeAll('loading');
                },
            });
        }
        
        
    }


    function disPlayNode(nodePara,nodeEn) {
        console.info(JSON.stringify(nodePara));
        var form_node_param = {};
        form_node_param["_EnWater"] = nodePara.EnWater>0?"on":"";
        form_node_param["_EnTB"] = nodePara.EnTB>0?"on":"";
        form_node_param["_Enable"] = nodeEn>0?"on":"";
        form_node_param["Mode"] = nodePara.Mode;
        if(nodePara.Tmr_flag_bits[1]){
            form_node_param["_EnAutoSwitchGrowthMode"] = "on";
            vm.autoSwitchGrowthMode = 1;
        }else{
            form_node_param["_EnAutoSwitchGrowthMode"] = "";
            vm.autoSwitchGrowthMode = 0;
        }
        if(nodePara.Tmr_flag_bits[2]){
            form_node_param["_EnFirstTouchAsFirstFeed"] = "on";
        }else{
            form_node_param["_EnFirstTouchAsFirstFeed"] = "";
        }
        if(nodePara.Tmr_flag_bits[3]){
            form_node_param["_EnMotorCurProtect"] = "";
        }else{
            form_node_param["_EnMotorCurProtect"] = "on";
        }
        if(nodePara.Tmr_flag_bits[4]){
            form_node_param["_EnMotorCurIdle"] = "on";
        }else{
            form_node_param["_EnMotorCurIdle"] = "";
        }
        if(nodePara.Tmr_flag_bits[5]){
            vm.wp_unit = "1";
        }else{
            vm.wp_unit = "0";
        }

        console.info(form_node_param);
        form.val("form_node_param",form_node_param);

        //模式
        vm.mode = nodePara.Mode;
        console.info(JSON.stringify("nodePara.Mode",nodePara.Mode));
        vm.enTB = nodePara.EnTB;
        //妊娠
        vm.Pg_para = [];
        for(var i=0;i<nodePara.Pg_gday.length;i++)
        {
            //计算当日总料量
            var Pg_feed_num = 0;
            var Pg_total_feed = 0;
            var Pg_time = [];
            
            for(var x=0;x<nodePara.Pg_startT[i].length;x++){
                

                if(nodePara.Pg_startT[i][x]!="00:00" || nodePara.Pg_endT[i][x]!="00:00"){
                    Pg_time.push(nodePara.Pg_startT[i][x]+" - "+nodePara.Pg_endT[i][x]);
                    Pg_total_feed += parseFloat(nodePara.Pg_outT[i][x]);
                    Pg_feed_num+=1;
                }else{
                    if(no_display_zero){
                        Pg_time.push("");
                    }
                    else{
                        Pg_time.push(nodePara.Pg_startT[i][x]+" - "+nodePara.Pg_endT[i][x]);
                    }
                }

                nodePara.Pg_outT[i][x] = (parseFloat(nodePara.Pg_outT[i][x])>0?nodePara.Pg_outT[i][x]:"");
            }

            console.info(nodePara.Pg_flag[i])
            console.info(nodePara.Pg_flag_bits[i])
            vm.Pg_para.push({
                Pg_gday:nodePara.Pg_gday[i],
                //Pg_startT:nodePara.Pg_startT[i],
                //Pg_endT:nodePara.Pg_endT[i],
                Pg_outT:(parseFloat(nodePara.Pg_outT[i])>0?nodePara.Pg_outT[i]:""),
                Pg_waterFeed:nodePara.Pg_waterFeed[i],
                Pg_firstFeed:nodePara.Pg_firstFeed[i],
                Pg_ftbFeed:nodePara.Pg_ftbFeed[i],
                Pg_tbFeed:nodePara.Pg_tbFeed[i],
                Pg_wgapTime:nodePara.Pg_wgapTime[i],
                Pg_cw:nodePara.Pg_cw[i],
                Pg_autoFeed:nodePara.Pg_autoFeed[i],
                Pg_fgapTime:nodePara.Pg_fgapTime[i],
                Pg_flag:nodePara.Pg_flag[i],
                Pg_flag_bits:nodePara.Pg_flag_bits[i],
                Pg_rev:nodePara.Pg_rev[i],
                Pg_rev_bits:nodePara.Pg_rev_bits[i],

                Pg_feed_num:Pg_feed_num,
                Pg_time:Pg_time,
                Pg_total_feed:parseFloat(Pg_total_feed.toFixed(2)),
            });
        }

        //哺乳
        vm.La_para = [];
        for(var i=0;i<nodePara.La_gday.length;i++)
        {
            //计算当日总料量
            var La_feed_num = 0;
            var La_total_feed = 0;
            var La_time = [];
            
            for(var x=0;x<nodePara.La_startT[i].length;x++){
                

                if(nodePara.La_startT[i][x]!="00:00" || nodePara.La_endT[i][x]!="00:00"){
                    La_time.push(nodePara.La_startT[i][x]+" - "+nodePara.La_endT[i][x]);
                    La_total_feed += parseFloat(nodePara.La_outT[i][x]);
                    La_feed_num+=1;
                }else{
                    if(no_display_zero){
                        La_time.push("");
                    }
                    else{
                        La_time.push(nodePara.La_startT[i][x]+" - "+nodePara.La_endT[i][x]);
                    }
                }

                nodePara.La_outT[i][x] = (parseFloat(nodePara.La_outT[i][x])>0?nodePara.La_outT[i][x]:"");
            }
            
            vm.La_para.push({
                La_gday:nodePara.La_gday[i],
                La_startT:nodePara.La_startT[i],
                La_endT:nodePara.La_endT[i],
                La_outT:nodePara.La_outT[i],
                La_waterFeed:nodePara.La_waterFeed[i],
                La_firstFeed:nodePara.La_firstFeed[i],
                La_ftbFeed:nodePara.La_ftbFeed[i],
                La_tbFeed:nodePara.La_tbFeed[i],
                La_wgapTime:nodePara.La_wgapTime[i],
                La_cw:nodePara.La_cw[i],
                La_autoFeed:nodePara.La_autoFeed[i],
                La_fgapTime:nodePara.La_fgapTime[i],
                La_flag:nodePara.La_flag[i],
                La_flag_bits:nodePara.La_flag_bits[i],
                La_rev:nodePara.La_rev[i],
                La_rev_bits:nodePara.La_rev_bits[i],

                La_feed_num:La_feed_num,
                La_time:La_time,
                La_total_feed:parseFloat(La_total_feed.toFixed(2)),
            });
        }

        //保育
        vm.Nr_para = [];
        for(var i=0;i<nodePara.Nr_gday.length;i++)
        {
            //计算当日总料量
            var Nr_time = [];
            
            for(var x=0;x<nodePara.Nr_startT[i].length;x++){
                //Nr_time.push(nodePara.Nr_startT[i][x]+" - "+nodePara.Nr_endT[i][x]);

                if(nodePara.Nr_startT[i][x]!="00:00" || nodePara.Nr_endT[i][x]!="00:00"){
                    Nr_time.push(nodePara.Nr_startT[i][x]+" - "+nodePara.Nr_endT[i][x]);
                }else{
                    if(no_display_zero){
                        Nr_time.push("");
                    }
                    else{
                        Nr_time.push(nodePara.Nr_startT[i][x]+" - "+nodePara.Nr_endT[i][x]);
                    }
                }
            }
            vm.Nr_para.push({
                Nr_gday:nodePara.Nr_gday[i],
                Nr_startT:nodePara.Nr_startT[i],
                Nr_endT:nodePara.Nr_endT[i],
                
                Nr_waterFeed:nodePara.Nr_waterFeed[i],
                Nr_autoFeed:nodePara.Nr_autoFeed[i],
                Nr_fgapTime:nodePara.Nr_fgapTime[i],
                Nr_wgapTime:nodePara.Nr_wgapTime[i],
                Nr_cw:nodePara.Nr_cw[i],
                Nr_flag:nodePara.Nr_flag[i],
                Nr_flag_bits:nodePara.Nr_flag_bits[i],

                Nr_time:Nr_time,
            });
        }

        //育肥
        vm.Fat_para = [];
        for(var i=0;i<nodePara.Fat_gday.length;i++)
        {
            //计算当日总料量
            var Fat_time = [];
            
            for(var x=0;x<nodePara.Fat_startT[i].length;x++){
                //Fat_time.push(nodePara.Fat_startT[i][x]+" - "+nodePara.Fat_endT[i][x]);
                if(nodePara.Fat_startT[i][x]!="00:00" || nodePara.Fat_endT[i][x]!="00:00"){
                    Fat_time.push(nodePara.Fat_startT[i][x]+" - "+nodePara.Fat_endT[i][x]);
                }else{
                    if(no_display_zero){
                        Fat_time.push("");
                    }
                    else{
                        Fat_time.push(nodePara.Fat_startT[i][x]+" - "+nodePara.Fat_endT[i][x]);
                    }
                }
            }
            vm.Fat_para.push({
                Fat_gday:nodePara.Fat_gday[i],
                Fat_startT:nodePara.Fat_startT[i],
                Fat_endT:nodePara.Fat_endT[i],
                
                Fat_waterFeed:nodePara.Fat_waterFeed[i],
                Fat_autoFeed:nodePara.Fat_autoFeed[i],
                Fat_fgapTime:nodePara.Fat_fgapTime[i],
                Fat_wgapTime:nodePara.Fat_wgapTime[i],
                Fat_cw:nodePara.Fat_cw[i],
                Fat_flag:nodePara.Fat_flag[i],
                Fat_flag_bits:nodePara.Fat_flag_bits[i],

                Fat_time:Fat_time,
            });
        }

        //定时
        vm.Tmr_para = {};
        var Tmr_time = [];
        var Tmr_feed_num = 0;
        var Tmr_total_feed = 0;

        for(var i=0;i<nodePara.Tmr_startT.length;i++)
        {
            
            /*if(nodePara.Tmr_startT[i]!="00:00" || nodePara.Tmr_endT[i]!="00:00"){
                Tmr_total_feed += parseFloat(nodePara.Tmr_outT[i]);
                Tmr_feed_num+=1;
            }
            Tmr_time.push(nodePara.Tmr_startT[i]+" - "+nodePara.Tmr_endT[i]);*/

            if(nodePara.Tmr_startT[i]!="00:00" || nodePara.Tmr_endT[i]!="00:00"){
                Tmr_total_feed += parseFloat(nodePara.Tmr_outT[i]);
                Tmr_feed_num+=1;
                Tmr_time.push(nodePara.Tmr_startT[i]+" - "+nodePara.Tmr_endT[i]);
            }else{
                if(no_display_zero){
                    Tmr_time.push("");
                }
                else{
                    Tmr_time.push(nodePara.Tmr_startT[i]+" - "+nodePara.Tmr_endT[i]);
                }
            }
            nodePara.Tmr_outT[i] = (parseFloat(nodePara.Tmr_outT[i])>0?nodePara.Tmr_outT[i]:"");
        }
        vm.Tmr_para = {
            Tmr_outT:nodePara.Tmr_outT,
            Tmr_waterFeed:nodePara.Tmr_waterFeed,
            Tmr_wgapTime:nodePara.Tmr_wgapTime,
            Tmr_cw:nodePara.Tmr_cw,
            Tmr_flag:nodePara.Tmr_flag,

            Tmr_time:Tmr_time,
            Tmr_feed_num:Tmr_feed_num,
            Tmr_total_feed:Tmr_total_feed,
            Tmr_flag_bits:nodePara.Tmr_flag_bits,
        };

        vm.node_para = nodePara;

        vm.$forceUpdate();
        setTimeout(function(){checkPermission();},500);
        resize();
    }
    
    function onRefresh(){
        loadPara(request);
    }

    function onMaxSize(){
        var url = window.location.href;
        if(url.indexOf('?')>=0){
            url+="&max=1";
        }else{
            url+="?max=1";
        }
        console.info(url);
        window.open(url);
    }

    function resize() {
        var h = $(window).height();

        $(".node_para").slimScroll({
            height: h-65,
            size: '4px', //组件宽度
            color: '#eee', //滚动条颜色
            position: 'right', //组件位置：left/right
            distance: '0px', //组件与侧边之间的距离
            start: 'top', //默认滚动位置：top/bottom
            opacity: .4, //滚动条透明度
            alwaysVisible: true, //是否 始终显示组件
            disableFadeOut: false, //是否 鼠标经过可滚动区域时显示组件，离开时隐藏组件
            railVisible: true, //是否 显示轨道
            railColor: '#333', //轨道颜色
            railOpacity: .2, //轨道透明度
            railDraggable: true, //是否 滚动条可拖动
            railClass: 'slimScrollRail', //轨道div类名
            barClass: 'slimScrollBar', //滚动条div类名
            wrapperClass: 'slimScrollDiv', //外包div类名
            allowPageScroll: true, //是否 使用滚轮到达顶端/底端时，滚动窗口
            wheelStep: 10, //滚轮滚动量
            touchScrollStep: 200, //滚动量当用户使用手势
            borderRadius: '7px', //滚动条圆角
            railBorderRadius: '7px' //轨道圆角
        });
    }
    $(window).resize(function () {
        //console.info('resize')
        resize();
    });
    function formatminutes(date){
        $($(".laydate-time-list li ol")[2]).find("li").remove(); //清空秒
    }
</script>
<script src="../js/check_screen.js?v=${.Config.basic.version}"></script>

</html>